Optimal. Leaf size=90 \[ -\frac {b d n (f x)^m}{f m^2}-\frac {b e n x^m (f x)^m}{4 f m^2}+\frac {d (f x)^m \left (a+b \log \left (c x^n\right )\right )}{f m}+\frac {e x^m (f x)^m \left (a+b \log \left (c x^n\right )\right )}{2 f m} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 113, normalized size of antiderivative = 1.26, number of steps
used = 5, number of rules used = 4, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.160, Rules used = {2377, 2376,
272, 45} \begin {gather*} \frac {x^{1-m} (f x)^{m-1} \left (d+e x^m\right )^2 \left (a+b \log \left (c x^n\right )\right )}{2 e m}-\frac {b d^2 n x^{1-m} \log (x) (f x)^{m-1}}{2 e m}-\frac {b d n x (f x)^{m-1}}{m^2}-\frac {b e n x^{m+1} (f x)^{m-1}}{4 m^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 272
Rule 2376
Rule 2377
Rubi steps
\begin {align*} \int (f x)^{-1+m} \left (d+e x^m\right ) \left (a+b \log \left (c x^n\right )\right ) \, dx &=\left (x^{1-m} (f x)^{-1+m}\right ) \int x^{-1+m} \left (d+e x^m\right ) \left (a+b \log \left (c x^n\right )\right ) \, dx\\ &=\frac {x^{1-m} (f x)^{-1+m} \left (d+e x^m\right )^2 \left (a+b \log \left (c x^n\right )\right )}{2 e m}-\frac {\left (b n x^{1-m} (f x)^{-1+m}\right ) \int \frac {\left (d+e x^m\right )^2}{x} \, dx}{2 e m}\\ &=\frac {x^{1-m} (f x)^{-1+m} \left (d+e x^m\right )^2 \left (a+b \log \left (c x^n\right )\right )}{2 e m}-\frac {\left (b n x^{1-m} (f x)^{-1+m}\right ) \text {Subst}\left (\int \frac {(d+e x)^2}{x} \, dx,x,x^m\right )}{2 e m^2}\\ &=\frac {x^{1-m} (f x)^{-1+m} \left (d+e x^m\right )^2 \left (a+b \log \left (c x^n\right )\right )}{2 e m}-\frac {\left (b n x^{1-m} (f x)^{-1+m}\right ) \text {Subst}\left (\int \left (2 d e+\frac {d^2}{x}+e^2 x\right ) \, dx,x,x^m\right )}{2 e m^2}\\ &=-\frac {b d n x (f x)^{-1+m}}{m^2}-\frac {b e n x^{1+m} (f x)^{-1+m}}{4 m^2}-\frac {b d^2 n x^{1-m} (f x)^{-1+m} \log (x)}{2 e m}+\frac {x^{1-m} (f x)^{-1+m} \left (d+e x^m\right )^2 \left (a+b \log \left (c x^n\right )\right )}{2 e m}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.05, size = 61, normalized size = 0.68 \begin {gather*} \frac {(f x)^m \left (2 a m \left (2 d+e x^m\right )-b n \left (4 d+e x^m\right )+2 b m \left (2 d+e x^m\right ) \log \left (c x^n\right )\right )}{4 f m^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.10, size = 425, normalized size = 4.72
method | result | size |
risch | \(\frac {b \left (e \,x^{m}+2 d \right ) x \,{\mathrm e}^{\frac {\left (-1+m \right ) \left (-i \pi \mathrm {csgn}\left (i f x \right )^{3}+i \pi \mathrm {csgn}\left (i f x \right )^{2} \mathrm {csgn}\left (i f \right )+i \pi \mathrm {csgn}\left (i f x \right )^{2} \mathrm {csgn}\left (i x \right )-i \pi \,\mathrm {csgn}\left (i f x \right ) \mathrm {csgn}\left (i f \right ) \mathrm {csgn}\left (i x \right )+2 \ln \left (x \right )+2 \ln \left (f \right )\right )}{2}} \ln \left (x^{n}\right )}{2 m}-\frac {\left (i \pi b e \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) x^{m} m -i \pi b e \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} x^{m} m -i \pi b e \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} x^{m} m +i \pi b e \mathrm {csgn}\left (i c \,x^{n}\right )^{3} x^{m} m +2 i \pi b d m \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )-2 i \pi b d m \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-2 i \pi b d m \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+2 i \pi b d m \mathrm {csgn}\left (i c \,x^{n}\right )^{3}-2 \ln \left (c \right ) b e \,x^{m} m -4 \ln \left (c \right ) b d m -2 x^{m} a e m +x^{m} b e n -4 a d m +4 b d n \right ) x \,{\mathrm e}^{\frac {\left (-1+m \right ) \left (-i \pi \mathrm {csgn}\left (i f x \right )^{3}+i \pi \mathrm {csgn}\left (i f x \right )^{2} \mathrm {csgn}\left (i f \right )+i \pi \mathrm {csgn}\left (i f x \right )^{2} \mathrm {csgn}\left (i x \right )-i \pi \,\mathrm {csgn}\left (i f x \right ) \mathrm {csgn}\left (i f \right ) \mathrm {csgn}\left (i x \right )+2 \ln \left (x \right )+2 \ln \left (f \right )\right )}{2}}}{4 m^{2}}\) | \(425\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.30, size = 115, normalized size = 1.28 \begin {gather*} -\frac {b d f^{m - 1} n x^{m}}{m^{2}} + \frac {b f^{m - 1} e^{\left (2 \, m \log \left (x\right ) + 1\right )} \log \left (c x^{n}\right )}{2 \, m} + \frac {a f^{m - 1} e^{\left (2 \, m \log \left (x\right ) + 1\right )}}{2 \, m} - \frac {b f^{m - 1} n e^{\left (2 \, m \log \left (x\right ) + 1\right )}}{4 \, m^{2}} + \frac {\left (f x\right )^{m} b d \log \left (c x^{n}\right )}{f m} + \frac {\left (f x\right )^{m} a d}{f m} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 80, normalized size = 0.89 \begin {gather*} \frac {{\left (2 \, b m n e \log \left (x\right ) + 2 \, b m e \log \left (c\right ) + {\left (2 \, a m - b n\right )} e\right )} f^{m - 1} x^{2 \, m} + 4 \, {\left (b d m n \log \left (x\right ) + b d m \log \left (c\right ) + a d m - b d n\right )} f^{m - 1} x^{m}}{4 \, m^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 445 vs.
\(2 (80) = 160\).
time = 16.53, size = 445, normalized size = 4.94 \begin {gather*} \begin {cases} \tilde {\infty } \left (d + e\right ) \left (a x - b n x + b x \log {\left (c x^{n} \right )}\right ) & \text {for}\: f = 0 \wedge m = 0 \\\frac {\left (d + e\right ) \left (\begin {cases} a \log {\left (x \right )} & \text {for}\: b = 0 \\- \left (- a - b \log {\left (c \right )}\right ) \log {\left (x \right )} & \text {for}\: n = 0 \\\frac {\left (- a - b \log {\left (c x^{n} \right )}\right )^{2}}{2 b n} & \text {otherwise} \end {cases}\right )}{f} & \text {for}\: m = 0 \\0^{m - 1} \left (\frac {a d m^{2} x}{m^{2} + 2 m + 1} + \frac {2 a d m x}{m^{2} + 2 m + 1} + \frac {a d x}{m^{2} + 2 m + 1} + \frac {a e m x x^{m}}{m^{2} + 2 m + 1} + \frac {a e x x^{m}}{m^{2} + 2 m + 1} - \frac {b d m^{2} n x}{m^{2} + 2 m + 1} + \frac {b d m^{2} x \log {\left (c x^{n} \right )}}{m^{2} + 2 m + 1} - \frac {2 b d m n x}{m^{2} + 2 m + 1} + \frac {2 b d m x \log {\left (c x^{n} \right )}}{m^{2} + 2 m + 1} - \frac {b d n x}{m^{2} + 2 m + 1} + \frac {b d x \log {\left (c x^{n} \right )}}{m^{2} + 2 m + 1} + \frac {b e m x x^{m} \log {\left (c x^{n} \right )}}{m^{2} + 2 m + 1} - \frac {b e n x x^{m}}{m^{2} + 2 m + 1} + \frac {b e x x^{m} \log {\left (c x^{n} \right )}}{m^{2} + 2 m + 1}\right ) & \text {for}\: f = 0 \\\frac {a d \left (f x\right )^{m}}{f m} + \frac {a e x^{m} \left (f x\right )^{m}}{2 f m} + \frac {b d \left (f x\right )^{m} \log {\left (c x^{n} \right )}}{f m} - \frac {b d n \left (f x\right )^{m}}{f m^{2}} + \frac {b e x^{m} \left (f x\right )^{m} \log {\left (c x^{n} \right )}}{2 f m} - \frac {b e n x^{m} \left (f x\right )^{m}}{4 f m^{2}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 4.09, size = 150, normalized size = 1.67 \begin {gather*} \frac {b d f^{m} n x^{m} \log \left (x\right )}{f m} + \frac {b f^{m} n x^{2 \, m} e \log \left (x\right )}{2 \, f m} + \frac {b d f^{m} x^{m} \log \left (c\right )}{f m} + \frac {b f^{m} x^{2 \, m} e \log \left (c\right )}{2 \, f m} + \frac {a d f^{m} x^{m}}{f m} - \frac {b d f^{m} n x^{m}}{f m^{2}} + \frac {a f^{m} x^{2 \, m} e}{2 \, f m} - \frac {b f^{m} n x^{2 \, m} e}{4 \, f m^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\left (f\,x\right )}^{m-1}\,\left (d+e\,x^m\right )\,\left (a+b\,\ln \left (c\,x^n\right )\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________